package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IActivitieGiftDao;
import com.financing.platform.dto.ActivitieGiftDTO;
import com.financing.platform.util.SqlName;


@Repository("activitieGiftDaoImpl")
public class ActivitieGiftDaoImpl extends BaseDaoImpl implements IActivitieGiftDao {

	@SuppressWarnings("unchecked")
	public List<ActivitieGiftDTO> queryActivitieGiftList(String faUserId) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.queryActiviteGift,faUserId);
	}

	public int updateActivitieGift(ActivitieGiftDTO activitieGiftDTO)
			throws SQLException {
		return this.sqlMapClient.update(SqlName.updateActiviteGift,activitieGiftDTO);
	}

	@Override
	public List<ActivitieGiftDTO> queryActivitiesMollionsWealthGift(
			ActivitieGiftDTO dto) throws Exception {
		return this.sqlMapClient.queryForList(SqlName.queryActivitiesMollionsWealthGift, dto);
	}

	@Override
	public int addActivitieGift(ActivitieGiftDTO activitieGiftDTO)
			throws Exception {
		return (Integer) this.sqlMapClient.insert(SqlName.addActivitieGift, activitieGiftDTO);
	}

	@Override
	public List<ActivitieGiftDTO> queryActivitiesSDHDGift(ActivitieGiftDTO dto) throws Exception {
		return this.sqlMapClient.queryForList(SqlName.queryActivitiesSDHDGift,dto);
	}

	@Override
	public List<ActivitieGiftDTO> queryActivitiesGiftByCode(ActivitieGiftDTO dto)
			throws Exception {
		return this.sqlMapClient.queryForList(SqlName.queryActivitiesGiftByCode,dto);
	}

}
